const Koa = require('koa');
const bodyParser = require('koa-bodyparser');
const cors = require('koa2-cors');
const Router = require('./router');
// const proxy = require('./proxy');//代理
const app = new Koa()

const path = require('path');
const serve = require('koa-static');
const main = serve(path.join('www'));
const socket = require('./socket');
app
.use(cors())
.use(bodyParser())
// .use(proxy)
.use(main)
Router(app)
socket(app)
app.listen(9000)
